﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>HelloWorld: HelloWorld Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                HelloWorld: HelloWorld Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">HelloWorld Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="HelloWorld" -->
<p><code>#include &lt;<a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>&gt;</code></p>

<p><a href="class_hello_world-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a324c343816abe39a4c258c32c0350403">HelloWorld</a> (boost::asio::io_service &amp;io_service)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a9a5716edac248441d78476abed771147">~HelloWorld</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a601db66f2f14e5a4aedd9a47e7153290">IncrementCounter</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a7b3f996be5391131ec0b41a1313981f3">HasReachedLimit</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#acb474364e0865a453568be86aea0f1f7">Print</a> (const std::string &amp;message)</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HelloWorldContext *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#adc22abbeb0d307b4db212e78d7266348">iRtxCount</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_hello_world.html#a8e08edbc4910aefba11531ff65f35009">iCounter</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_hello_world_8h_source.html#l00018">18</a> of file <a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a324c343816abe39a4c258c32c0350403"></a><!-- doxytag: member="HelloWorld::HelloWorld" ref="a324c343816abe39a4c258c32c0350403" args="(boost::asio::io_service &amp;io_service)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HelloWorld::HelloWorld </td>
          <td>(</td>
          <td class="paramtype">boost::asio::io_service &amp;&#160;</td>
          <td class="paramname"><em>io_service</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8cpp_source.html#l00012">12</a> of file <a class="el" href="_hello_world_8cpp_source.html">HelloWorld.cpp</a>.</p>
<div class="fragment"><pre class="fragment">: <a class="code" href="class_hello_world.html#adc22abbeb0d307b4db212e78d7266348">iRtxCount</a>(<a class="code" href="_hello_world_8cpp.html#a7a21204459b1fa26f83e9fd9bff74679">RTX_COUNT</a>), 
  <a class="code" href="class_hello_world.html#a8e08edbc4910aefba11531ff65f35009">iCounter</a>(0)
{
    <a class="code" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a> = <span class="keyword">new</span> HelloWorldContext(*<span class="keyword">this</span>, io_service);
    <a class="code" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a>-&gt;SetObserver(SmBoostObserver::GetInstance());
    <a class="code" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a>-&gt;EnterInitialState();
    <a class="code" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a>-&gt;EvStart();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a9a5716edac248441d78476abed771147"></a><!-- doxytag: member="HelloWorld::~HelloWorld" ref="a9a5716edac248441d78476abed771147" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HelloWorld::~HelloWorld </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8cpp_source.html#l00022">22</a> of file <a class="el" href="_hello_world_8cpp_source.html">HelloWorld.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keyword">delete</span> <a class="code" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">m_pContext</a>;
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7b3f996be5391131ec0b41a1313981f3"></a><!-- doxytag: member="HelloWorld::HasReachedLimit" ref="a7b3f996be5391131ec0b41a1313981f3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool HelloWorld::HasReachedLimit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8cpp_source.html#l00032">32</a> of file <a class="el" href="_hello_world_8cpp_source.html">HelloWorld.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keywordflow">if</span>(<a class="code" href="class_hello_world.html#a8e08edbc4910aefba11531ff65f35009">iCounter</a> == <a class="code" href="class_hello_world.html#adc22abbeb0d307b4db212e78d7266348">iRtxCount</a>){
        <span class="keywordflow">return</span> <span class="keyword">true</span>;
    }<span class="keywordflow">else</span> {
        <span class="keywordflow">return</span> <span class="keyword">false</span>;
    }
}
</pre></div>
</div>
</div>
<a class="anchor" id="a601db66f2f14e5a4aedd9a47e7153290"></a><!-- doxytag: member="HelloWorld::IncrementCounter" ref="a601db66f2f14e5a4aedd9a47e7153290" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HelloWorld::IncrementCounter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8h_source.html#l00024">24</a> of file <a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>.</p>
<div class="fragment"><pre class="fragment">{<a class="code" href="class_hello_world.html#a8e08edbc4910aefba11531ff65f35009">iCounter</a>++;};
</pre></div>
</div>
</div>
<a class="anchor" id="acb474364e0865a453568be86aea0f1f7"></a><!-- doxytag: member="HelloWorld::Print" ref="acb474364e0865a453568be86aea0f1f7" args="(const std::string &amp;message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HelloWorld::Print </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8cpp_source.html#l00027">27</a> of file <a class="el" href="_hello_world_8cpp_source.html">HelloWorld.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    BOOST_LOG_L2(message);
}
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a8e08edbc4910aefba11531ff65f35009"></a><!-- doxytag: member="HelloWorld::iCounter" ref="a8e08edbc4910aefba11531ff65f35009" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_hello_world.html#a8e08edbc4910aefba11531ff65f35009">HelloWorld::iCounter</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8h_source.html#l00031">31</a> of file <a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>.</p>

</div>
</div>
<a class="anchor" id="adc22abbeb0d307b4db212e78d7266348"></a><!-- doxytag: member="HelloWorld::iRtxCount" ref="adc22abbeb0d307b4db212e78d7266348" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_hello_world.html#adc22abbeb0d307b4db212e78d7266348">HelloWorld::iRtxCount</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8h_source.html#l00030">30</a> of file <a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1c0505e2390c6e96b71215abbfaa3a8a"></a><!-- doxytag: member="HelloWorld::m_pContext" ref="a1c0505e2390c6e96b71215abbfaa3a8a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HelloWorldContext* <a class="el" href="class_hello_world.html#a1c0505e2390c6e96b71215abbfaa3a8a">HelloWorld::m_pContext</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_hello_world_8h_source.html#l00029">29</a> of file <a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_hello_world_8h_source.html">HelloWorld.h</a></li>
<li><a class="el" href="_hello_world_8cpp_source.html">HelloWorld.cpp</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
